<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

// ------------------------------------------------------------------------

/**
 * Application
 *
 */
class All_app extends K9_Deploy_Controller
{
	/**
     * Constructor
     *
     * @access  public
     * @return  void
     */
	public function __construct()
	{
		parent::__construct();	
		$this->_check_permit();
		$this->load->model('deploy/account_model');
		$this->load->model('deploy/app_info_model');
	}
	
	// ------------------------------------------------------------------------
	
	/**
     * Default entrance
     *
     * @access  public
     * @param   int
     * @return  void
     */
	public function view()
	{
		$data['language'] = $this->language;
		
		if ($this->session->userdata('uid'))
		{	
			$data['list'] = $this->app_info_model->get_app_info();
			$this->_template ( $this->language . '/all_app', $data );
		}
		else
		{
			$this->load->view($this->language.'/login',$data);
		}
	}

}
